<template>
  <router-view />
</template>

<script>
import { createWeb3Modal, defaultWagmiConfig } from "@web3modal/wagmi1/vue";
import { mainnet, arbitrum } from "viem/chains";
export default {
  created() {},
  mounted() {
    // 1. Get projectId at https://cloud.walletconnect.com
    const projectId = "5c1a4c976f1b0893ada7459f4695a278";
    if (!projectId) {
      throw new Error("VITE_PROJECT_ID is not set");
    }

    // 2. Create wagmiConfig
    const metadata = {
      name: "DAI",
      description: "DAI-login",
      url: "https://www.aisc.tech/#/",
      // url: "http://localhost:8080/#/",
      icons: ["https://avatars.githubusercontent.com/u/37784886"],
    };

    const chains = [mainnet, arbitrum];
    // console.log(chains)
    const wagmiConfig = defaultWagmiConfig({ chains, projectId, metadata });

    // 3. Create modal
    createWeb3Modal({ wagmiConfig, projectId, chains });
  },
  methods: {},
};
</script>

<style lang="less" scoped>
@import "@/assets/css/flex.css";
</style>
